<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>Adminox - Responsive Web App Kit</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description">
    <meta content="Coderthemes" name="author">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- App favicon -->
    <link rel="shortcut icon" href="${ctx}/admin/${ctx}/admin/images/favicon.ico">
    <!-- DataTables -->
    <link href="${ctx}/admin/plugins/datatables/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css">
    <link href="${ctx}/admin/plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css">
    <!-- Responsive datatable examples -->
    <link href="${ctx}/admin/plugins/datatables/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css">
    <!-- App css -->
    <link href="${ctx}/admin/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="${ctx}/admin/css/icons.css" rel="stylesheet" type="text/css">
    <link href="${ctx}/admin/css/metismenu.min.css" rel="stylesheet" type="text/css">
    <link href="${ctx}/admin/css/style.css" rel="stylesheet" type="text/css">
    <script src="${ctx}/admin/js/modernizr.min.js"></script>
</head>
<body>
<!-- Begin page -->
<div id="wrapper">
    <#include "common/header.ftl">
    <!-- Top Bar End -->
    <!-- ========== Left Sidebar Start ========== -->
    <#include "common/menu.ftl">
    <!-- Left Sidebar End -->
    <!-- ============================================================== -->
    <!-- Start right Content here -->
    <!-- ============================================================== -->
    <div class="content-page">
        <!-- Start content -->
        <div class="content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-12">
                        <div class="page-title-box">
                            <h4 class="page-title float-left">文章列表</h4>
                            <ol class="breadcrumb float-right">
                                <li class="breadcrumb-item"><a href="#">Adminox</a></li>
                                <li class="breadcrumb-item"><a href="#">Tables</a></li>
                                <li class="breadcrumb-item active">Datatable</li>
                            </ol>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                </div>
                <!-- end row -->
                <div class="row">
                    <div class="col-12">
                        <div class="card-box table-responsive">
                            <h4 class="text-uppercase font-18">文章列表</h4>
                            <div class="border m-b-30"></div>
                            <table id="datatable-buttons" class="table table-striped table-bordered" cellspacing="0"
                                   width="100%">
                                <thead>
                                <tr>
                                    <th>标题</th>
                                    <th>分类</th>
                                    <th>浏览数</th>
                                    <th>评论数量</th>
                                    <th>发布日期</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <!-- end row -->
            </div>
            <!-- container -->
        </div>
        <!-- content -->
    <#include "common/footer.ftl">
    </div>
    <!-- ============================================================== -->
    <!-- End Right content here -->
    <!-- ============================================================== -->
</div>
<!-- END wrapper -->
<!-- jQuery  -->
<script src="${ctx}/admin/js/jquery.min.js"></script>
<script src="${ctx}/admin/js/tether.min.js"></script>
<!-- Tether for Bootstrap -->
<script src="${ctx}/admin/js/bootstrap.min.js"></script>
<script src="${ctx}/admin/js/metisMenu.min.js"></script>
<script src="${ctx}/admin/js/waves.js"></script>
<script src="${ctx}/admin/js/jquery.slimscroll.js"></script>
<!-- Required datatable js -->
<script src="${ctx}/admin/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="${ctx}/admin/plugins/datatables/dataTables.bootstrap4.min.js"></script>
<!-- Buttons examples -->
<script src="${ctx}/admin/plugins/datatables/dataTables.buttons.min.js"></script>
<script src="${ctx}/admin/plugins/datatables/buttons.bootstrap4.min.js"></script>
<script src="${ctx}/admin/plugins/datatables/jszip.min.js"></script>
<script src="${ctx}/admin/plugins/datatables/pdfmake.min.js"></script>
<script src="${ctx}/admin/plugins/datatables/vfs_fonts.js"></script>
<script src="${ctx}/admin/plugins/datatables/buttons.html5.min.js"></script>
<script src="${ctx}/admin/plugins/datatables/buttons.print.min.js"></script>
<script src="${ctx}/admin/plugins/datatables/buttons.colVis.min.js"></script>
<!-- Responsive examples -->
<script src="${ctx}/admin/plugins/datatables/dataTables.responsive.min.js"></script>
<script src="${ctx}/admin/plugins/datatables/responsive.bootstrap4.min.js"></script>
<!-- App js -->
<script src="${ctx}/admin/js/jquery.core.js"></script>
<script src="${ctx}/admin/js/jquery.app.js"></script>
<script type="text/javascript">
    /*$(document).ready(function () {
        var table = $('#datatable-buttons').dataTable({
            bStateSave: true, //状态保存
            bLengthChange: false,
            bFilter: false,
            bSort: false,
            serverSide: true,
            iDisplayLength: 10,
            buttons: ['copy', 'excel', 'pdf', 'colvis'],
            ajax: {
                url: "${ctx}/admin/article/list",
                type: "GET",
                cache: false,
                data: function (d) {
                }
            },
            columns: [{
                "data": "title",
            }, {
                "data": "categoryList",
                "render": function (data, type, row, meta) {
                    var text = '';
                    $(data).each(function () {
                        text += "<span class='label label-success'>" + this.title + "</span>&nbsp;&nbsp;";
                    });
                    return text;
                }
            }, {
                "data": "viewCount",
            }, {
                "data": "commentCount",
            }, {
                "data": "created",
            }, {
                "render": function (data, type, row, meta) {
                    var text = '<a title="\编辑\" href="javascript:;" style="text-decoration:none"><i class="fa fa-pencil"></i> </a>';
                    return text;
                }
            }]
        }).api();
    })*/
</script>
</body>
</html>